using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Helper;
namespace CoreData
{
    public class getmoney
    {
            public long id{get;set;}
            public long userid{get;set;}
            public int money{get;set;}
            public int status{get;set;}
            public DateTime requestdate{get;set;}
            public DateTime completedate{get;set;}
         
        public getmoney()
        {       
        }
        
       static getmoney DynamicCast<T>(object row_data, object row_header) where T : getmoney
       {
           // row_data : DataRow
           // row_header : DataColumnCollection
           getmoney ret = new getmoney();
           DataRow dt = (DataRow)row_data;

           foreach (DataColumn column in (DataColumnCollection)row_header)
           {
               switch (column.ColumnName)
               {
                      case  "id":
                        ret.id = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "userid":
                        ret.userid = ConvertObject.ToLong(dt[column]);
                       break;
                      case  "money":
                        ret.money = ConvertObject.ToInt(dt[column]);
                       break;
                      case  "status":
                        ret.status = ConvertObject.ToInt(dt[column]);
                       break;
                      case  "requestdate":
                        ret.requestdate = ConvertObject.ToDateTime(dt[column]);
                       break;
                      case  "completedate":
                        ret.completedate = ConvertObject.ToDateTime(dt[column]);
                       break;
                
                   default:
                       break;
               }
           }

           return ret;
       }
        
    }
}
